/*

NOTES:
 
- Sets up folder structure 
- Executes all programs needed to create dataset "p_extendecost.dta" with childcare and goods/services input prices by state-year

*/
set more off
clear
cls

*******************
* DIRECTORY SETUP *
*******************

global root "D:\users\llochner\Dropbox\JOINT PROJECTS\JPE_Child_Devp_2020\FINAL_Replication_CLMP_JPE"  // USER MUST SET THIS FOLDER

*******************

global data_cps  "$root/data/data_CPS"
global statecpi  "$root/data/data_CPI_RPP"
global childcost "$root/data/data_ChildCareAware"

global dofiles   "$root/code/data_cleaning/prices"
global logfiles  "$root/code/data_cleaning/prices/logs"
global temp      "$root/code/data_cleaning/prices/temp_data"

global data_der	 "$root/data/data_derived"


****************************
* MAIN DO FILES TO EXECUTE *
****************************

* First, clean CPS data and get average wages for childcare workers by state-year

do "$dofiles/Read_cps_00008"    // read raw cps data
do "$dofiles/Clean_CPS"	      // basic data cleaning														
do "$dofiles/CPS_Wage_v2"      // create output data sets with average log wages by state/year for childcare workers

clear
cls

* Merge all data and produce data with childcare and goods/services input prices

do "$dofiles/ReadCosts.do"          // Imports the childcost data
do "$dofiles/ReadWage.do"           // Imports the cleaned CPS wage data
do "$dofiles/ReadStateCPI.do"       // Imports statelevel CPI
do "$dofiles/MergeChildWageCPI.do"  // Merges the datasets and declares panel
do "$dofiles/Predicted_series.do"   // Creates the predicted series: "p_extendedcosts.dta"

